<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Collision Checker: cpp/collision/src/collision_checker.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Collision Checker
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_df511e5bd85cec96854b39d5e1c27aa8.html">cpp</a></li><li class="navelem"><a class="el" href="dir_bf0f0c8865c1942e08ab5157e2c596db.html">collision</a></li><li class="navelem"><a class="el" href="dir_0bc2acc18702bc40f3a0aa3bc19285f7.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">collision_checker.cc</div>  </div>
</div><!--header-->
<div class="contents">
<a href="collision__checker_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="collision__checker_8h.html">collision/collision_checker.h</a>&quot;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="rectangle__obb_8h.html">collision/narrowphase/rectangle_obb.h</a>&quot;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="primitive__collision__checker_8h.html">collision/primitive_collision_checker.h</a>&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="raytrace__utils_8h.html">collision/raytrace_utils.h</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#if ENABLE_SERIALIZER</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="serialize__public_8h.html">collision/serialize/public/serialize_public.h</a>&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision.html">collision</a> {</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#acded699038b6f0872998532fbee498f5">   15</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_collision_checker.html#acded699038b6f0872998532fbee498f5">CollisionChecker::addCollisionObject</a>(<a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> co) {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;  <a class="code" href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision_objects_</a>.push_back(co);</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  <a class="code" href="classcollision_1_1_collision_checker.html#a605c5763ed2a920435e50187bf26d7d7">fcl_cc_</a>.<a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker.html#a40d1b64cd06786b2c828e995937cddae">addCollisionObject</a>(co);</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;}</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#a4e0712276f0d648a1b6993498eb568fe">   32</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="classcollision_1_1_collision_checker.html#a4e0712276f0d648a1b6993498eb568fe">CollisionChecker::collisionTime</a>(<a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> co)<span class="keyword"> const </span>{</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  <span class="keywordtype">int</span> res = -1;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <a class="code" href="classcollision_1_1_collision_checker.html#afbd1ef6a0ced0038e7145f83a0aef93c">collide</a>(co, &amp;res);</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;}</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">#if (ENABLE_COLLISION_TESTS)</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1_collision_checker.html#afbd1ef6a0ced0038e7145f83a0aef93c">CollisionChecker::collide</a>(<a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> co, <span class="keywordtype">int</span> *collision_time,</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;                               <span class="keywordtype">bool</span> enable_test)<span class="keyword"> const </span>{</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  <span class="keywordflow">if</span> (enable_test) {</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="classcollision_1_1test_1_1_collision_checker_test.html">collision::test::CollisionCheckerTest</a> cc_test;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    cc_test.<a class="code" href="classcollision_1_1test_1_1_collision_checker_test.html#ad6f104b12727529c3e91b29b21e07f6b">run_test_collide</a>(co, <span class="keyword">this</span>);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  }</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#afbd1ef6a0ced0038e7145f83a0aef93c">   59</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1_collision_checker.html#afbd1ef6a0ced0038e7145f83a0aef93c">CollisionChecker::collide</a>(<a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> co,</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                               <span class="keywordtype">int</span> *collision_time)<span class="keyword"> const </span>{</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  <a class="code" href="application_8h.html#aece99bdae80f594f9dfafc41b5bf0e7b">STACK_TIMER</a> tim(<a class="code" href="application_8h.html#af4d2d208505d40534e1af130d3e02d75">TIMER_collide</a>);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_collision_checker.html#a605c5763ed2a920435e50187bf26d7d7">fcl_cc_</a>.<a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker.html#a5088bcb0c1f882a9bbba06b3f186e2e0">collideHelper</a>(co, collision_time, 0);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  <span class="keywordtype">bool</span> collides = <span class="keyword">false</span>;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;}</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="preprocessor">#if (ENABLE_COLLISION_TESTS)</span></div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1_collision_checker.html#afbd1ef6a0ced0038e7145f83a0aef93c">CollisionChecker::collide</a>(<a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> co,</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                               <a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> &amp;obstacle,</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                               <span class="keywordtype">bool</span> ungroup_shape_groups,</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                               <span class="keywordtype">bool</span> ungroup_TV_obstacles,</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                               <span class="keywordtype">bool</span> enable_test)<span class="keyword"> const </span>{</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  <span class="keywordflow">if</span> (enable_test) {</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    std::cout &lt;&lt; <span class="stringliteral">&quot;testing&quot;</span>;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <a class="code" href="classcollision_1_1test_1_1_collision_checker_test.html">collision::test::CollisionCheckerTest</a> cc_test;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    cc_test.<a class="code" href="classcollision_1_1test_1_1_collision_checker_test.html#adea6847b8308d19c0ed26f6acc169bec">run_test_collide_obstacle</a>(co, <span class="keyword">this</span>);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  }</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#a9a7943bd0dcc05a261f7d90a3fc4ead4">  104</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1_collision_checker.html#afbd1ef6a0ced0038e7145f83a0aef93c">CollisionChecker::collide</a>(<a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> co,</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;                               <a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> &amp;obstacle,</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                               <span class="keywordtype">bool</span> ungroup_shape_groups,</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                               <span class="keywordtype">bool</span> ungroup_TV_obstacles)<span class="keyword"> const </span>{</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  std::vector&lt;CollisionObjectConstPtr&gt; obstacles;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  <span class="keywordtype">bool</span> res = <a class="code" href="classcollision_1_1_collision_checker.html#a605c5763ed2a920435e50187bf26d7d7">fcl_cc_</a>.<a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker.html#a5088bcb0c1f882a9bbba06b3f186e2e0">collideHelper</a>(co, 0, &amp;obstacles, 1, ungroup_shape_groups,</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                                   ungroup_TV_obstacles);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="keywordflow">if</span> (res) {</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">if</span> (obstacles.size() &gt; 0) {</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;      obstacle = obstacles[0];</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    }</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  }</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;}</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#ab143c35c5989325e2f2fb7fba632c471">  151</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1_collision_checker.html#ab143c35c5989325e2f2fb7fba632c471">CollisionChecker::rayTrace</a>(<span class="keyword">const</span> Eigen::Vector2d &amp;point1,</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;                                <span class="keyword">const</span> Eigen::Vector2d &amp;point2,</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;                                std::vector&lt;LineSegment&gt; &amp;intersect,</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;                                <span class="keywordtype">bool</span> remove_overlaps) {</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;  <span class="keywordtype">double</span> eps = 0.000001;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  <span class="keywordtype">double</span> sqrlen =</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;      (pow(point1[0] - point2[0], 2) + pow(point1[1] - point2[1], 2));</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;  <span class="comment">// if ray length is greater than epsilon, filter the colliding obstacles</span></div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  <span class="keywordflow">if</span> (sqrlen &gt;= eps) {</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    Eigen::Vector2d center = (point2 + point1) / 2;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    Eigen::Vector2d local_x_axis = center - point1;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordtype">double</span> rad_x = sqrt(sqrlen) / 2; <span class="comment">// radius of the ray OBB</span></div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    local_x_axis /= rad_x;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    Eigen::Vector2d local_y_axis(-local_x_axis[1], local_x_axis[0]);</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    Eigen::Matrix2d local_axes;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    local_axes.col(0) = local_x_axis;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    local_axes.col(1) = local_y_axis;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <a class="code" href="namespacecollision.html#a1b9f7f7168669daac5b0cd11930e4cb8">collision::RectangleOBBConstPtr</a> robb(</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keyword">new</span> <a class="code" href="classcollision_1_1_rectangle_o_b_b.html">collision::RectangleOBB</a>(rad_x, eps, local_axes, center));</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    std::vector&lt;CollisionObjectConstPtr&gt; obstacles;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classcollision_1_1_collision_checker.html#afbd1ef6a0ced0038e7145f83a0aef93c">collide</a>(robb, obstacles, 1, 1)) {</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;      <span class="keywordflow">return</span> <a class="code" href="namespacecollision_1_1raytrace.html#a7cb335e7c302c0f66577263e9cfa9d93">collision::raytrace::rayTracePrimitive</a>(obstacles, point1, point2,</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;                                                    intersect, remove_overlaps);</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    } <span class="keywordflow">else</span></div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;      <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacecollision_1_1raytrace.html#a7cb335e7c302c0f66577263e9cfa9d93">collision::raytrace::rayTracePrimitive</a>(</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        <a class="code" href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision_objects_</a>, point1, point2, intersect, remove_overlaps);</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  }</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;}</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#a19831589411e9533c819e3368c6126bf">  186</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_collision_checker.html#a19831589411e9533c819e3368c6126bf">CollisionChecker::toString</a>(std::ostringstream &amp;stream)<span class="keyword"> const </span>{</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  stream &lt;&lt; <span class="stringliteral">&quot;CollisionChecker &quot;</span></div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;         &lt;&lt; <span class="stringliteral">&quot;objects: &quot;</span>;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;obj : <a class="code" href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision_objects_</a>) {</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    obj-&gt;toString(stream);</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;  }</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;  stream &lt;&lt; <span class="stringliteral">&quot;\\CollisionChecker &quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;}</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;<span class="preprocessor">#if (ENABLE_COLLISION_TESTS)</span></div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1_collision_checker.html#afbd1ef6a0ced0038e7145f83a0aef93c">CollisionChecker::collide</a>(<a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> co,</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                               std::vector&lt;CollisionObjectConstPtr&gt; &amp;obstacles,</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                               <span class="keywordtype">bool</span> ungroup_shape_groups,</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;                               <span class="keywordtype">bool</span> ungroup_TV_obstacles,</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                               <span class="keywordtype">bool</span> enable_test)<span class="keyword"> const </span>{</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;  <span class="keywordflow">if</span> (enable_test) {</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <a class="code" href="classcollision_1_1test_1_1_collision_checker_test.html">collision::test::CollisionCheckerTest</a> cc_test;</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    cc_test.<a class="code" href="classcollision_1_1test_1_1_collision_checker_test.html#aa064302d3248cdbd8985ae9f9d06a9fa">run_test_collide_obstacles</a>(co, <span class="keyword">this</span>);</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;  }</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#acaea564dc6218f856fc7dcd28ca57fb8">  229</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1_collision_checker.html#afbd1ef6a0ced0038e7145f83a0aef93c">CollisionChecker::collide</a>(<a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> co,</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                               std::vector&lt;CollisionObjectConstPtr&gt; &amp;obstacles,</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                               <span class="keywordtype">bool</span> ungroup_shape_groups,</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                               <span class="keywordtype">bool</span> ungroup_TV_obstacles)<span class="keyword"> const </span>{</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_collision_checker.html#a605c5763ed2a920435e50187bf26d7d7">fcl_cc_</a>.<a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker.html#a5088bcb0c1f882a9bbba06b3f186e2e0">collideHelper</a>(co, 0, &amp;obstacles, -1, ungroup_shape_groups,</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                               ungroup_TV_obstacles);</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;  <span class="keywordtype">bool</span> collides = <span class="keyword">false</span>;</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;c : <a class="code" href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision_objects_</a>)</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="keywordflow">if</span> (c-&gt;collide(*co)) {</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;      obstacles.push_back(c);</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;      collides = <span class="keyword">true</span>;</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    }</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;  <span class="keywordflow">return</span> collides;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;}</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<a class="code" href="namespacecollision.html#a26b4aad32d10b8574b3dde076db249b6">PrimitiveCollisionCheckerPtr</a></div><div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#a970f71867c6598da2ff29f645cc5dc33">  259</a></span>&#160;<a class="code" href="classcollision_1_1_collision_checker.html#a970f71867c6598da2ff29f645cc5dc33">CollisionChecker::windowQueryPrimitive</a>(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_rectangle_a_a_b_b.html">RectangleAABB</a> &amp;aabb)<span class="keyword"> const </span>{</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;  <a class="code" href="namespacecollision.html#a26b4aad32d10b8574b3dde076db249b6">PrimitiveCollisionCheckerPtr</a> cc_ret =</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;      std::make_shared&lt;PrimitiveCollisionChecker&gt;();</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;  <a class="code" href="classcollision_1_1_collision_checker.html#a605c5763ed2a920435e50187bf26d7d7">fcl_cc_</a>.<a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker.html#ae35b8d368c6529a86d073ab7d7c45f20">windowQuery_helper</a>(aabb, *(cc_ret.get()));</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;  <span class="keywordflow">return</span> cc_ret;</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;}</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<a class="code" href="namespacecollision.html#a41db47b373df476bf4e0bd5cf7ed2d6b">CollisionCheckerPtr</a></div><div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#a275d33c4855e33cd1692d1b50fb74810">  281</a></span>&#160;<a class="code" href="classcollision_1_1_collision_checker.html#a275d33c4855e33cd1692d1b50fb74810">CollisionChecker::windowQuery</a>(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_rectangle_a_a_b_b.html">RectangleAABB</a> &amp;aabb)<span class="keyword"> const </span>{</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  <a class="code" href="application_8h.html#aece99bdae80f594f9dfafc41b5bf0e7b">STACK_TIMER</a> tim(<a class="code" href="application_8h.html#a3addf1d229b2983125fa8d3975a25587">TIMER_windowQuery</a>);</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  <a class="code" href="namespacecollision.html#a41db47b373df476bf4e0bd5cf7ed2d6b">CollisionCheckerPtr</a> cc_ret = std::make_shared&lt;CollisionChecker&gt;();</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;  <a class="code" href="classcollision_1_1_collision_checker.html#a605c5763ed2a920435e50187bf26d7d7">fcl_cc_</a>.<a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker.html#ae35b8d368c6529a86d073ab7d7c45f20">windowQuery_helper</a>(aabb, *(cc_ret.get()));</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;  <span class="keywordflow">return</span> cc_ret;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;}</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#a99e1067067af2ebc3454da0c64f8b9cd">  298</a></span>&#160;<a class="code" href="namespacecollision.html#a41db47b373df476bf4e0bd5cf7ed2d6b">CollisionCheckerPtr</a> <a class="code" href="classcollision_1_1_collision_checker.html#a99e1067067af2ebc3454da0c64f8b9cd">CollisionChecker::timeSlice</a>(<span class="keywordtype">int</span> time_idx)<span class="keyword"> const </span>{</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;  <a class="code" href="application_8h.html#aece99bdae80f594f9dfafc41b5bf0e7b">STACK_TIMER</a> tim(<a class="code" href="application_8h.html#a8afcd7ec1dd7c61c3ffc37383ae72471">TIMER_timeSlice</a>);</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;  <a class="code" href="namespacecollision.html#a41db47b373df476bf4e0bd5cf7ed2d6b">CollisionCheckerPtr</a> cc_ret(<span class="keyword">new</span> <a class="code" href="classcollision_1_1_collision_checker.html#aadf36b4bbca1a64a2b497f41f2f53e8b">CollisionChecker</a>());</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;c : <a class="code" href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision_objects_</a>) {</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> tmp = c-&gt;timeSlice(time_idx, c);</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    <span class="keywordflow">if</span> (tmp != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;      cc_ret-&gt;addCollisionObject(tmp);</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;    }</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;  }</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;  <span class="keywordflow">return</span> cc_ret;</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;}</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;</div><div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#af7c8460a5c01d2c2a5afae4f583231f0">  315</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="classcollision_1_1_collision_checker.html#af7c8460a5c01d2c2a5afae4f583231f0">CollisionChecker::numberOfObstacles</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision_objects_</a>.size();</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;}</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;</div><div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#a5706822775c534f6aa4318dbbdda97bd">  324</a></span>&#160;std::vector&lt;CollisionObjectConstPtr&gt; <a class="code" href="classcollision_1_1_collision_checker.html#a5706822775c534f6aa4318dbbdda97bd">CollisionChecker::getObstacles</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision_objects_</a>;</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;}</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;</div><div class="line"><a name="l00328"></a><span class="lineno"><a class="line" href="classcollision_1_1_collision_checker.html#a633266d69fdaadc964559016d049b795">  328</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_collision_checker.html#a633266d69fdaadc964559016d049b795">CollisionChecker::print</a>(std::ostringstream &amp;stream)<span class="keyword"> const </span>{</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;  stream &lt;&lt; <span class="stringliteral">&quot;CollisionChecker number of CollisionObjects: &quot;</span></div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;         &lt;&lt; <a class="code" href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision_objects_</a>.size() &lt;&lt; std::endl;</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision_objects_</a>.size(); i++) {</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    <a class="code" href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision_objects_</a>[i]-&gt;print(stream);</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;  }</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;}</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;<span class="preprocessor">#if ENABLE_SERIALIZER</span></div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;<span class="keywordtype">int</span> <a class="code" href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">CollisionChecker::serialize</a>(std::ostream &amp;output_stream)<span class="keyword"> const </span>{</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">serialize::serialize</a>(std::static_pointer_cast&lt;const CollisionChecker&gt;(</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;                                  this-&gt;shared_from_this()),</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;                              output_stream);</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;}</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;<a class="code" href="namespacecollision.html#a95bc7457b930479570887882efed9e6e">CollisionCheckerConstPtr</a></div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;<a class="code" href="namespacecollision_1_1serialize.html#afa68d93c7ceeaba3b3a6a32bf9917aba">CollisionChecker::deserialize</a>(std::istream &amp;input_stream) {</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;  <a class="code" href="namespacecollision.html#a95bc7457b930479570887882efed9e6e">CollisionCheckerConstPtr</a> ret;</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;  <span class="keywordflow">if</span> (!<a class="code" href="namespacecollision_1_1serialize.html#afa68d93c7ceeaba3b3a6a32bf9917aba">serialize::deserialize</a>(ret, input_stream)) {</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;  } <span class="keywordflow">else</span></div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacecollision.html#a95bc7457b930479570887882efed9e6e">CollisionCheckerConstPtr</a>(0);</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;}</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">serialize</a> {</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;ICollisionCheckerExport *exportObject(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_collision_checker.html">collision::CollisionChecker</a> &amp;);</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;}</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;serialize::ICollisionCheckerExport *CollisionChecker::exportThis(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;  <span class="keywordflow">return</span> serialize::exportObject(*<span class="keyword">this</span>);</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;}</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;} <span class="comment">// namespace collision</span></div><div class="ttc" id="namespacecollision_html_a95bc7457b930479570887882efed9e6e"><div class="ttname"><a href="namespacecollision.html#a95bc7457b930479570887882efed9e6e">collision::CollisionCheckerConstPtr</a></div><div class="ttdeci">std::shared_ptr&lt; const CollisionChecker &gt; CollisionCheckerConstPtr</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00024">collision_checker.h:24</a></div></div>
<div class="ttc" id="classcollision_1_1_rectangle_o_b_b_html"><div class="ttname"><a href="classcollision_1_1_rectangle_o_b_b.html">collision::RectangleOBB</a></div><div class="ttdoc">Oriented rectangle.</div><div class="ttdef"><b>Definition:</b> <a href="rectangle__obb_8h_source.html#l00016">rectangle_obb.h:16</a></div></div>
<div class="ttc" id="namespacecollision_html_a26b4aad32d10b8574b3dde076db249b6"><div class="ttname"><a href="namespacecollision.html#a26b4aad32d10b8574b3dde076db249b6">collision::PrimitiveCollisionCheckerPtr</a></div><div class="ttdeci">std::shared_ptr&lt; PrimitiveCollisionChecker &gt; PrimitiveCollisionCheckerPtr</div><div class="ttdef"><b>Definition:</b> <a href="primitive__collision__checker_8h_source.html#l00020">primitive_collision_checker.h:20</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_a633266d69fdaadc964559016d049b795"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#a633266d69fdaadc964559016d049b795">collision::CollisionChecker::print</a></div><div class="ttdeci">void print(std::ostringstream &amp;stream) const</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00328">collision_checker.cc:328</a></div></div>
<div class="ttc" id="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker_html_a5088bcb0c1f882a9bbba06b3f186e2e0"><div class="ttname"><a href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker.html#a5088bcb0c1f882a9bbba06b3f186e2e0">collision::solvers::solverFCL::FCLCollisionChecker::collideHelper</a></div><div class="ttdeci">bool collideHelper(CollisionObjectConstPtr co, int *collision_time, std::vector&lt; CollisionObjectConstPtr &gt; *obstacles, int max_obstacles=-1, bool ungroup_shape_groups=false, bool ungroup_TV_obstacles=false) const</div><div class="ttdef"><b>Definition:</b> <a href="fcl__collision__checker_8cc_source.html#l00190">fcl_collision_checker.cc:190</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_a5706822775c534f6aa4318dbbdda97bd"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#a5706822775c534f6aa4318dbbdda97bd">collision::CollisionChecker::getObstacles</a></div><div class="ttdeci">std::vector&lt; CollisionObjectConstPtr &gt; getObstacles(void) const</div><div class="ttdoc">Returns a Vector with all contained CollisionObjects of any type.</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00324">collision_checker.cc:324</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_af7c8460a5c01d2c2a5afae4f583231f0"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#af7c8460a5c01d2c2a5afae4f583231f0">collision::CollisionChecker::numberOfObstacles</a></div><div class="ttdeci">int numberOfObstacles(void) const</div><div class="ttdoc">Returns number of contained CollisionObjects of any type.</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00315">collision_checker.cc:315</a></div></div>
<div class="ttc" id="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker_html_ae35b8d368c6529a86d073ab7d7c45f20"><div class="ttname"><a href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker.html#ae35b8d368c6529a86d073ab7d7c45f20">collision::solvers::solverFCL::FCLCollisionChecker::windowQuery_helper</a></div><div class="ttdeci">void windowQuery_helper(const RectangleAABB &amp;aabb, ICollisionChecker &amp;ret) const</div><div class="ttdef"><b>Definition:</b> <a href="fcl__collision__checker_8cc_source.html#l00268">fcl_collision_checker.cc:268</a></div></div>
<div class="ttc" id="application_8h_html_a8afcd7ec1dd7c61c3ffc37383ae72471"><div class="ttname"><a href="application_8h.html#a8afcd7ec1dd7c61c3ffc37383ae72471">TIMER_timeSlice</a></div><div class="ttdeci">#define TIMER_timeSlice</div><div class="ttdef"><b>Definition:</b> <a href="application_8h_source.html#l00032">application.h:32</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_aadf36b4bbca1a64a2b497f41f2f53e8b"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#aadf36b4bbca1a64a2b497f41f2f53e8b">collision::CollisionChecker::CollisionChecker</a></div><div class="ttdeci">EIGEN_MAKE_ALIGNED_OPERATOR_NEW CollisionChecker()</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00053">collision_checker.h:53</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html"><div class="ttname"><a href="classcollision_1_1_collision_checker.html">collision::CollisionChecker</a></div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00045">collision_checker.h:45</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_acded699038b6f0872998532fbee498f5"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#acded699038b6f0872998532fbee498f5">collision::CollisionChecker::addCollisionObject</a></div><div class="ttdeci">void addCollisionObject(CollisionObjectConstPtr co)</div><div class="ttdoc">Adds a collision object into the CollisionChecker group structure.</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00015">collision_checker.cc:15</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_ab143c35c5989325e2f2fb7fba632c471"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#ab143c35c5989325e2f2fb7fba632c471">collision::CollisionChecker::rayTrace</a></div><div class="ttdeci">bool rayTrace(const Eigen::Vector2d &amp;point1, const Eigen::Vector2d &amp;point2, std::vector&lt; LineSegment &gt; &amp;intersect, bool remove_overlaps=true)</div><div class="ttdoc">adds a collision object to the CC</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00151">collision_checker.cc:151</a></div></div>
<div class="ttc" id="namespacecollision_html_a1b9f7f7168669daac5b0cd11930e4cb8"><div class="ttname"><a href="namespacecollision.html#a1b9f7f7168669daac5b0cd11930e4cb8">collision::RectangleOBBConstPtr</a></div><div class="ttdeci">std::shared_ptr&lt; const RectangleOBB &gt; RectangleOBBConstPtr</div><div class="ttdef"><b>Definition:</b> <a href="collision__object_8h_source.html#l00104">collision_object.h:104</a></div></div>
<div class="ttc" id="namespacecollision_html_a405f2c04407997fea529aad88f04ad30"><div class="ttname"><a href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">collision::CollisionObjectConstPtr</a></div><div class="ttdeci">std::shared_ptr&lt; const CollisionObject &gt; CollisionObjectConstPtr</div><div class="ttdef"><b>Definition:</b> <a href="collision__object_8h_source.html#l00041">collision_object.h:41</a></div></div>
<div class="ttc" id="namespacecollision_html"><div class="ttname"><a href="namespacecollision.html">collision</a></div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00020">collision_checker.h:20</a></div></div>
<div class="ttc" id="namespacecollision_html_a41db47b373df476bf4e0bd5cf7ed2d6b"><div class="ttname"><a href="namespacecollision.html#a41db47b373df476bf4e0bd5cf7ed2d6b">collision::CollisionCheckerPtr</a></div><div class="ttdeci">std::shared_ptr&lt; CollisionChecker &gt; CollisionCheckerPtr</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00022">collision_checker.h:22</a></div></div>
<div class="ttc" id="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker_html_a40d1b64cd06786b2c828e995937cddae"><div class="ttname"><a href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_checker.html#a40d1b64cd06786b2c828e995937cddae">collision::solvers::solverFCL::FCLCollisionChecker::addCollisionObject</a></div><div class="ttdeci">void addCollisionObject(CollisionObjectConstPtr co)</div><div class="ttdef"><b>Definition:</b> <a href="fcl__collision__checker_8cc_source.html#l00039">fcl_collision_checker.cc:39</a></div></div>
<div class="ttc" id="classcollision_1_1test_1_1_collision_checker_test_html_ad6f104b12727529c3e91b29b21e07f6b"><div class="ttname"><a href="classcollision_1_1test_1_1_collision_checker_test.html#ad6f104b12727529c3e91b29b21e07f6b">collision::test::CollisionCheckerTest::run_test_collide</a></div><div class="ttdeci">bool run_test_collide(CollisionObjectConstPtr co, const collision::CollisionChecker *cc)</div></div>
<div class="ttc" id="classcollision_1_1test_1_1_collision_checker_test_html_adea6847b8308d19c0ed26f6acc169bec"><div class="ttname"><a href="classcollision_1_1test_1_1_collision_checker_test.html#adea6847b8308d19c0ed26f6acc169bec">collision::test::CollisionCheckerTest::run_test_collide_obstacle</a></div><div class="ttdeci">bool run_test_collide_obstacle(CollisionObjectConstPtr co, const collision::CollisionChecker *cc)</div></div>
<div class="ttc" id="namespacecollision_1_1raytrace_html_a7cb335e7c302c0f66577263e9cfa9d93"><div class="ttname"><a href="namespacecollision_1_1raytrace.html#a7cb335e7c302c0f66577263e9cfa9d93">collision::raytrace::rayTracePrimitive</a></div><div class="ttdeci">bool rayTracePrimitive(std::vector&lt; collision::CollisionObjectConstPtr &gt; collision_objects, const Eigen::Vector2d &amp;point1, const Eigen::Vector2d &amp;point2, std::vector&lt; LineSegment &gt; &amp;intersect, bool remove_overlaps)</div><div class="ttdef"><b>Definition:</b> <a href="raytrace__utils_8cc_source.html#l00080">raytrace_utils.cc:80</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_afbd1ef6a0ced0038e7145f83a0aef93c"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#afbd1ef6a0ced0038e7145f83a0aef93c">collision::CollisionChecker::collide</a></div><div class="ttdeci">bool collide(CollisionObjectConstPtr co, int *collision_time=0) const</div><div class="ttdoc">Returns true if any of the objects contained in the CollisionChecker collide with the given object.</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00059">collision_checker.cc:59</a></div></div>
<div class="ttc" id="application_8h_html_a3addf1d229b2983125fa8d3975a25587"><div class="ttname"><a href="application_8h.html#a3addf1d229b2983125fa8d3975a25587">TIMER_windowQuery</a></div><div class="ttdeci">#define TIMER_windowQuery</div><div class="ttdef"><b>Definition:</b> <a href="application_8h_source.html#l00031">application.h:31</a></div></div>
<div class="ttc" id="namespacecollision_1_1serialize_html_afa68d93c7ceeaba3b3a6a32bf9917aba"><div class="ttname"><a href="namespacecollision_1_1serialize.html#afa68d93c7ceeaba3b3a6a32bf9917aba">collision::serialize::deserialize</a></div><div class="ttdeci">int deserialize(test::BroadphaseFailureCCObj &amp;bf_object, std::istream &amp;input_stream, const char *format=SERIALIZER_DEFAULT_FORMAT)</div></div>
<div class="ttc" id="raytrace__utils_8h_html"><div class="ttname"><a href="raytrace__utils_8h.html">raytrace_utils.h</a></div></div>
<div class="ttc" id="primitive__collision__checker_8h_html"><div class="ttname"><a href="primitive__collision__checker_8h.html">primitive_collision_checker.h</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_a4e0712276f0d648a1b6993498eb568fe"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#a4e0712276f0d648a1b6993498eb568fe">collision::CollisionChecker::collisionTime</a></div><div class="ttdeci">int collisionTime(CollisionObjectConstPtr co) const</div><div class="ttdoc">Returns timestep at which any of the objects contained in the CollisionChecker collides with the give...</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00032">collision_checker.cc:32</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_a767cd3dd7c7e58eba68b023ebbe9925a"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#a767cd3dd7c7e58eba68b023ebbe9925a">collision::CollisionChecker::collision_objects_</a></div><div class="ttdeci">std::vector&lt; CollisionObjectConstPtr &gt; collision_objects_</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00112">collision_checker.h:112</a></div></div>
<div class="ttc" id="classcollision_1_1_rectangle_a_a_b_b_html"><div class="ttname"><a href="classcollision_1_1_rectangle_a_a_b_b.html">collision::RectangleAABB</a></div><div class="ttdoc">Axis-aligned rectangle.</div><div class="ttdef"><b>Definition:</b> <a href="rectangle__aabb_8h_source.html#l00018">rectangle_aabb.h:18</a></div></div>
<div class="ttc" id="serialize__public_8h_html"><div class="ttname"><a href="serialize__public_8h.html">serialize_public.h</a></div></div>
<div class="ttc" id="collision__checker_8h_html"><div class="ttname"><a href="collision__checker_8h.html">collision_checker.h</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_a99e1067067af2ebc3454da0c64f8b9cd"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#a99e1067067af2ebc3454da0c64f8b9cd">collision::CollisionChecker::timeSlice</a></div><div class="ttdeci">CollisionCheckerPtr timeSlice(int time_idx) const</div><div class="ttdoc">Returns new CollisionChecker with objects that exist at a given timestep.</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00298">collision_checker.cc:298</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_a275d33c4855e33cd1692d1b50fb74810"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#a275d33c4855e33cd1692d1b50fb74810">collision::CollisionChecker::windowQuery</a></div><div class="ttdeci">CollisionCheckerPtr windowQuery(const RectangleAABB &amp;aabb) const</div><div class="ttdoc">Returns new CollisionChecker with all static objects within the window and all time-variant obstacles...</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00281">collision_checker.cc:281</a></div></div>
<div class="ttc" id="namespacecollision_1_1serialize_html_aea63e6d672588912102de4dbfc13ba19"><div class="ttname"><a href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">collision::serialize::serialize</a></div><div class="ttdeci">int serialize(const test::BroadphaseFailureCCObj &amp;bf_object, std::ostream &amp;output_stream, const char *format=SERIALIZER_DEFAULT_FORMAT)</div></div>
<div class="ttc" id="application_8h_html_af4d2d208505d40534e1af130d3e02d75"><div class="ttname"><a href="application_8h.html#af4d2d208505d40534e1af130d3e02d75">TIMER_collide</a></div><div class="ttdeci">#define TIMER_collide</div><div class="ttdef"><b>Definition:</b> <a href="application_8h_source.html#l00033">application.h:33</a></div></div>
<div class="ttc" id="classcollision_1_1test_1_1_collision_checker_test_html_aa064302d3248cdbd8985ae9f9d06a9fa"><div class="ttname"><a href="classcollision_1_1test_1_1_collision_checker_test.html#aa064302d3248cdbd8985ae9f9d06a9fa">collision::test::CollisionCheckerTest::run_test_collide_obstacles</a></div><div class="ttdeci">bool run_test_collide_obstacles(CollisionObjectConstPtr co, const collision::CollisionChecker *cc)</div></div>
<div class="ttc" id="classcollision_1_1test_1_1_collision_checker_test_html"><div class="ttname"><a href="classcollision_1_1test_1_1_collision_checker_test.html">collision::test::CollisionCheckerTest</a></div><div class="ttdef"><b>Definition:</b> <a href="broadphase__test_8h_source.html#l00059">broadphase_test.h:59</a></div></div>
<div class="ttc" id="rectangle__obb_8h_html"><div class="ttname"><a href="rectangle__obb_8h.html">rectangle_obb.h</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_a19831589411e9533c819e3368c6126bf"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#a19831589411e9533c819e3368c6126bf">collision::CollisionChecker::toString</a></div><div class="ttdeci">void toString(std::ostringstream &amp;stream) const</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00186">collision_checker.cc:186</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_a970f71867c6598da2ff29f645cc5dc33"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#a970f71867c6598da2ff29f645cc5dc33">collision::CollisionChecker::windowQueryPrimitive</a></div><div class="ttdeci">PrimitiveCollisionCheckerPtr windowQueryPrimitive(const RectangleAABB &amp;aabb) const</div><div class="ttdoc">Returns new PrimitiveCollisionChecker with all static objects within the window and all time-variant ...</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8cc_source.html#l00259">collision_checker.cc:259</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_checker_html_a605c5763ed2a920435e50187bf26d7d7"><div class="ttname"><a href="classcollision_1_1_collision_checker.html#a605c5763ed2a920435e50187bf26d7d7">collision::CollisionChecker::fcl_cc_</a></div><div class="ttdeci">FCLCollisionChecker fcl_cc_</div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00113">collision_checker.h:113</a></div></div>
<div class="ttc" id="application_8h_html_aece99bdae80f594f9dfafc41b5bf0e7b"><div class="ttname"><a href="application_8h.html#aece99bdae80f594f9dfafc41b5bf0e7b">STACK_TIMER</a></div><div class="ttdeci">#define STACK_TIMER</div><div class="ttdef"><b>Definition:</b> <a href="application_8h_source.html#l00018">application.h:18</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
